﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using DataSet_fp_DyhTableAdapters;

public partial class MasterPage_Sub : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void HyperLink_counts_Init(object sender, EventArgs e)
    {
        //if (!IsPostBack)
        //{

        Dyh_reportTableAdapter reportta = new Dyh_reportTableAdapter();
        //DataSet_fp_Dyh.Dyh_reportDataTable reportta = new DataSet_fp_Dyh.Dyh_reportDataTable();
        HyperLink_counts.Text = reportta.Scalar_Counts_Query().ToString().Trim();

        //}

    }
    //protected void Button_google_Search_Click(object sender, EventArgs e)
    //{
    //    string url;
    //    url = "";
    //    if (RadioButtonList_type.SelectedValue == "1")
    //    {
    //        url = "http://www.google.cn/custom?q="+TextBox_question.Text.Trim()+"&sitesearch=&sa=Google搜索";
    //    }
    //    else if (RadioButtonList_type.SelectedValue == "2")
    //    {
    //        url = "http://www.google.cn/custom?q=" + TextBox_question.Text.Trim() + "&sitesearch=" + Request.ServerVariables["SERVER_NAME"].ToString().Trim() + "&sa=Google搜索";
    //    }
    //    Response.Redirect(url);
    //}


    /// <summary>
    /// 获取当前页URL地址
    /// </summary>
    private string GetUrl()
    {

        //取本页URL地址 
        string strTemp = "";
        if (Request.ServerVariables["HTTPS"] == "off")
        {
            strTemp = "http://";
        }
        else
        {
            strTemp = "https://";
        }

        strTemp = strTemp + Request.ServerVariables["SERVER_NAME"];

        if (Request.ServerVariables["SERVER_PORT"] != "80")
        {
            strTemp = strTemp + ":" + Request.ServerVariables["SERVER_PORT"];
        }

        strTemp = strTemp + Request.ServerVariables["URL"];

        if (Request.QueryString != null)
        {
            strTemp = strTemp + "?" + Request.QueryString;
        }

        return strTemp;
    }
}
